package com.xjggb.递归;

public class Digui {
    public static void main(String[] args) {

        int factorial = factorial(100);
        System.out.println("factorial = " + factorial);

    }
    public  static  int factorial(int n){
        if (n==0){
            return 1;
        }else {
            return factorial(n-1)+n;
        }
        

    }
}
